<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <!-- 1. 引入react核心库 -->
    <script src="./node_modules/react/umd/react.development.js"></script>
    <!-- 2. 引入react-dom 用于支持react操作dom -->
    <script src="./node_modules/react-dom/umd/react-dom.development.js"></script>
    <div id="box"></div>
    <script>
        // 3 创建react元素
        let item=React.createElement('div',{className:'item',title:'列表'},
            React.createElement('h2',{className:'title'},'中奖列表'),
            React.createElement('ul',{className:'list'},
                React.createElement('li',null,'zhangsan'),
                React.createElement('li',null,'2zhangsan'),
                React.createElement('li',{onClick:function(){alert('lisi')}},'3zhangsan'),
            )
            
        )
        // 4. 创建根节点（挂载点）
        let root =ReactDOM.createRoot(document.getElementById('box'))
        // 5.渲染元素到页面
        root.render(item)
    </script>
</head>
<body>
    
</body>
</html>